<!DOCTYPE html>
<html>
<#include "../head.html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>jquery图表插件Highcharts之线条图表</title>
         <!--  <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>  --><!-- 开始 -->
		 <script type="text/javascript" src="${request.getContextPath()}/themes/simagejs/jquery.min.js"></script> 
		<script type="text/javascript" src="${request.getContextPath()}/themes/simagejs/highcharts.js"></script>
		<!-- <script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script> -->
		<!--[if IE]>
			<script type="text/javascript" src="js/excanvas.compiled.js"></script>
		<![endif]-->
		

		<script type="text/javascript">
		var type=0;
		var chart;
		var yarray=[];
		var xarray=[];
		var alllist=new Array();
		alllist =${jsonString};		
		var columnArr=['激活数','注册数','注册率','实名认证','认证率','投资人数','首投人数','首投占比','首投金额','投资总额','回款额','新增待收','人均投资','平均期限','年化投资额'];
//-----用于两个时间段的比较 S:
	    var xOneArr=[];
	    var xTwoArr=[];
	    var yOneArr=[];
		var yTwoArr=[];
		var oneList=new Array();
		var twoList=new Array();
		var flag=0;
//-----用于两个时间段的比较 E:
		$(document).ready(function() {
			var yarray2=[];			 			 						  
			  var selectValue=$('#source').val();				 			 
			   for(var i=alllist.length-1;i>=0;i--){
				   xarray.push(alllist[i].selectTime);  
				   yarray.push(alllist[i].investmentNum);//投资人数
				   yarray2.push(alllist[i].newInvestmentNum);//首投人数
			  } 					  
			/*   <#list list as item>			
			  xarray.push('${item.selectTime}');
			  yarray.push('${item.activeNum}');
			  </#list> */
			
			chart = new Highcharts.Chart({
				chart: {
					renderTo: 'container',
					defaultSeriesType: 'line',
					margin: [50, 150, 60, 100]
				},
				credits:{
		            enabled:false
		        },
				title: {
					text: '',
					style: {
						margin: '10px 100px 0 0' // center it
					}
				},
		
				 xAxis: {	
					 tickInterval:2,
					 	categories: xarray, 					  					 	 
					},				 
				yAxis: {
					title: {
						text: 'value',
						
					},
					plotLines: [{
						value: 0,
						width: 1,
						color: '#808080'
					}]
				},
				tooltip: {
					formatter: function() {
			                return '<b>'+ this.series.name +'</b><br/>'+
			                this.x +': '+ this.y;							
					}
				},
				legend: {
					enable:false,
					 layout: 'vertical', 
					 align: "right", //程度标的目标地位
					　　verticalAlign: "top", //垂直标的目标地位
					　　x: 0, //间隔x轴的间隔
					　　y: 100 //间隔Y轴的间隔
				},
				series: [{data:yarray},{data:yarray2}]
			});	
			chart.series[0].name='投资人数';
			chart.series[1].name='首投人数';
		});
		
		/* $(function(){
			$('#myform').change(function(){
				alert($('#checkbox').val);
				 chart.series[0].remove(true);
				chart.series[0].name='哈哈';
				chart.series[0].setData([2, 8, 7, 11, 17, 22,8, 1, 1, 1]); 
			});
		});	 */	
		function compare(){
			//获取勾中的列值复选框，且只能勾选一个
            var $chks = $("#myform :checkbox:checked");
            var nameArr = [];
            $chks.each(function () {
                if ($.inArray($(this).attr("value"), nameArr) == -1) {  
                    nameArr.push($(this).attr("value"));                 
                }
            });
            if(nameArr.length==0){
            	alert("请勾选一个列值");
            	return null;
            }else if(nameArr.length>1){
            	alert("只能勾选一个列值");
            	return null;
            }
            //重新画图   
            var arr=[];//可能第一个时间段比第二个时间段短，那么X轴时间段会出问题
            var angle=0;//步长
            if(xOneArr.length>xTwoArr.length){
            	angle= parseInt(xOneArr.length/5);
            	arr=xOneArr;
            }else{
            	angle= parseInt(xTwoArr.length/5);
            	arr=xTwoArr
            }
              
            chart = new Highcharts.Chart({
				chart: {
					renderTo: 'container',
					defaultSeriesType: 'line',
					margin: [50, 150, 60, 80]
				},
				credits:{
		            enabled:false
		        },
				title: {
					text: '',
					style: {
						margin: '10px 100px 0 0' // center it
					}
				},
		
				 xAxis: {	
					 tickInterval:angle,
					 	 categories: arr/* , 					  
					 	 labels:{	
					 	 	x:-8, //调节x偏移
		                    rotation:angle//调节倾斜角度偏移 
		                 }   */
					},				 
				yAxis: {
					title: {
						text: 'value'
					},
					plotLines: [{
						value: 0,
						width: 1,
						color: '#808080'
					}]
				},
				tooltip: {
					formatter: function() {
						     var xTime="";	
						     var position=0;
						     for(var i=0;i<xOneArr.length;i++){
						    	 if(xOneArr[i]==this.x){
						    		 position=i;
						    		 break;
						    	 }
						     }
						     if(yOneArr[position]==this.y){
						    	 xTime=xOneArr[position];
						     }else{
						    	 xTime=xTwoArr[position];
						     }
						     
						   /*  if(this.y==yOneArr[this.x]){//鼠标停留在第一条线上   ,双线交叉值相等						    
						    	xTime=xOneArr[this.x];
						    }else{//鼠标停留在第二条线上
						    	xTime=xTwoArr[this.x];
						    }	 */					  						    
			                return '<b>'+ this.series.name +'</b><br/>'+
			                xTime +': '+ this.y;							
					}
				},
				legend: {
					 layout: 'vertical', 
					 align: "right", //程度标的目标地位
					　　verticalAlign: "top", //垂直标的目标地位
					　　x: 0, //间隔x轴的间隔
					　　y: 100 //间隔Y轴的间隔
				},
				series: [{data:[]},{data:[]}]
			});
            for(var k=oneList.length-1;k>=0;k--){
            	if(nameArr[0]==2){yOneArr.push(oneList[k].activeNum);} 
            	if(nameArr[0]==3){yOneArr.push(oneList[k].registerNum);}
            	if(nameArr[0]==4){yOneArr.push(Math.round(oneList[k].registerNum/oneList[k].activeNum*100*100)/100);}
            	if(nameArr[0]==5){yOneArr.push(oneList[k].realNameNum);}
            	if(nameArr[0]==6){yOneArr.push(Math.round(oneList[k].realNameNum/oneList[k].registerNum*100*100)/100);}
            	if(nameArr[0]==7){yOneArr.push(oneList[k].investmentNum);}
            	if(nameArr[0]==8){yOneArr.push(oneList[k].newInvestmentNum);}
            	if(nameArr[0]==9){yOneArr.push(Math.round(alllist[k].newInvestmentAccount/alllist[k].investmentTotal*100*100)/100);}
            	if(nameArr[0]==10){yOneArr.push(oneList[k].newInvestmentAccount);}
            	if(nameArr[0]==11){yOneArr.push(oneList[k].investmentTotal);}
            	if(nameArr[0]==12){yOneArr.push(oneList[k].paymentAccount);}
            	if(nameArr[0]==13){yOneArr.push(oneList[k].investmentTotal-oneList[k].paymentAccount);}
            	if(nameArr[0]==14){yOneArr.push(Math.round(oneList[k].investmentTotal/oneList[k].investmentNum*100*100)/100);}
            	if(nameArr[0]==15){yOneArr.push(Math.round(oneList[k].avgLimit/30*100)/100);}
            	if(nameArr[0]==16){yOneArr.push(oneList[k].yearInvestment);}           	
            }
            for(var k=twoList.length-1;k>=0;k--){
            	if(nameArr[0]==2){yTwoArr.push(twoList[k].activeNum);} 
            	if(nameArr[0]==3){yTwoArr.push(twoList[k].registerNum);}
            	if(nameArr[0]==4){yTwoArr.push(Math.round(twoList[k].registerNum/twoList[k].activeNum*100*100)/100);}
            	if(nameArr[0]==5){yTwoArr.push(twoList[k].realNameNum);}
            	if(nameArr[0]==6){yTwoArr.push(Math.round(twoList[k].realNameNum/twoList[k].registerNum*100*100)/100);}
            	if(nameArr[0]==7){yTwoArr.push(twoList[k].investmentNum);}
            	if(nameArr[0]==8){yTwoArr.push(twoList[k].newInvestmentNum);}
            	if(nameArr[0]==9){yTwoArr.push(Math.round(alllist[k].newInvestmentAccount/alllist[k].investmentTotal*100*100)/100);}
            	if(nameArr[0]==10){yTwoArr.push(twoList[k].newInvestmentAccount);}
            	if(nameArr[0]==11){yTwoArr.push(twoList[k].investmentTotal);}
            	if(nameArr[0]==12){yTwoArr.push(twoList[k].paymentAccount);}
            	if(nameArr[0]==13){yTwoArr.push(twoList[k].investmentTotal-twoList[k].paymentAccount);}
            	if(nameArr[0]==14){yTwoArr.push(Math.round(twoList[k].investmentTotal/twoList[k].investmentNum*100*100)/100);}
            	if(nameArr[0]==15){yTwoArr.push(Math.round(twoList[k].avgLimit/30*100)/100);}
            	if(nameArr[0]==16){yTwoArr.push(twoList[k].yearInvestment);}           	
            }
            /* alert(yOneArr);
            alert(yTwoArr); */
            chart.series[0].name=$('#start').val()+'至'+$('#end').val();
            chart.series[1].name=$('#thestart').val()+'至'+$('#theend').val();
            chart.series[0].setData(yOneArr); 
            chart.series[1].setData(yTwoArr); 
		}
				
		 function test() {	
			//获取勾中的复选框
            var $chks = $("#myform :checkbox:checked");
            var nameArr = [];
            $chks.each(function () {
                if ($.inArray($(this).attr("value"), nameArr) == -1) {  
                    nameArr.push($(this).attr("value"));                 
                }
            });
            if(nameArr.length==0){
            	alert("请至少选中一个列值！");
            	return null;
            }
           /*  alert(nameArr); */
            //新建一个chart对象
            var angle=0;//
            angle= parseInt(xarray.length/5);         
            chart = new Highcharts.Chart({
				chart: {
					renderTo: 'container',
					defaultSeriesType: 'line',
					margin: [50, 150, 60, 80]
				},
				credits:{
		            enabled:false
		        },
				title: {
					text: '',
					style: {
						margin: '10px 100px 0 0' // center it
					}
				},
		
				 xAxis: {	
					 tickInterval:angle,
					 	categories: xarray/* , 					  
					 	 labels:{	
					 		x:-8,//调节x偏移
		                    rotation:angle//调节倾斜角度偏移 
		                 }  */
					},				 
				yAxis: {
					title: {
						text: 'value'
					},
					plotLines: [{
						value: 0,
						width: 1,
						color: '#808080'
					}]
				},
				tooltip: {
					formatter: function() {
			                return '<b>'+ this.series.name +'</b><br/>'+
			                this.x +': '+ this.y;							
					}
				},
				legend: {
					 layout: 'vertical', 
					 align: "right", //程度标的目标地位
					　　verticalAlign: "top", //垂直标的目标地位
					　　x: 0, //间隔x轴的间隔
					　　y: 100 //间隔Y轴的间隔
				},
				series: [{data:[]},{data:[]},{data:[]},{data:[]},{data:[]},{data:[]}]
			});
            //循环为chart 的 series 的name和data赋值
            
            for(var i=0;i<nameArr.length;i++){            	
            	chart.series[i].name=columnArr[nameArr[i]-2];
            	yarray.length=0;
            	for(var k=alllist.length-1;k>=0;k--){
            		if(nameArr[i]==2){
            		   yarray.push(alllist[k].activeNum);
            		}
            		if(nameArr[i]==3){
					      yarray.push(alllist[k].registerNum);
					  }
					  if(nameArr[i]==4){				
						/* Math.round(num*100)/100 */
					      yarray.push(Math.round(alllist[k].registerNum/alllist[k].activeNum*100*100)/100);					    
					  }
					  if(nameArr[i]==5){
					      yarray.push(alllist[k].realNameNum);
					  }
					  if(nameArr[i]==6){
					      yarray.push(Math.round(alllist[k].realNameNum/alllist[k].registerNum*100*100)/100);
					  }
					  if(nameArr[i]==7){
					      yarray.push(alllist[k].investmentNum);
					  }
					  if(nameArr[i]==8){
					      yarray.push(alllist[k].newInvestmentNum);
					  }
					  if(nameArr[i]==9){
					      yarray.push(Math.round(alllist[k].newInvestmentAccount/alllist[k].investmentTotal*100*100)/100);
					  }
					  if(nameArr[i]==10){
					      yarray.push(alllist[k].newInvestmentAccount);
					  }
					  if(nameArr[i]==11){
					      yarray.push(alllist[k].investmentTotal);
					  }
					  if(nameArr[i]==12){
					      yarray.push(alllist[k].paymentAccount);
					  }
					  if(nameArr[i]==13){
					      yarray.push(alllist[k].investmentTotal-alllist[k].paymentAccount);
					  }
					  if(nameArr[i]==14){
					      yarray.push(Math.round(alllist[k].investmentTotal/alllist[k].investmentNum*100*100)/100);
					  }
					  if(nameArr[i]==15){
					      yarray.push(Math.round(alllist[k].avgLimit/30*100)/100);
					  }
					  if(nameArr[i]==16){
					      yarray.push(alllist[k].yearInvestment);
					  }
            	}           	
            	chart.series[i].setData(yarray);           	          	
            }
         }

		</script>
    <body class="full">  
    <table class="mc">
        <tr>
            <td class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </td>
            <td class="mc-m">
                <div class="navToggle"></div>
            </td>
            <td class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="投资统计(时间)">
                        <#include "banner.html">
                            <!--面包屑导航---}-->
                                     <div style="height:33px;line-height:22px;margin-left:86px;margin-top:21px">
		                                  <div class="formTit">显示日期：
		                                    <input class="_search-value" name="start" id="start" value="" onclick="change_picktime()"/>
		                                  </div>
	                                      <div class="formTit"> 到
		                                    <input class="_search-value" name="end" id="end" value=""  onclick="change_picktime()"/> 
		                                  </div>
		                                  <input type="checkbox" value="compare" style="margin-left:5px" onClick="showOrHide();"/>和其他时间段对比 
		                                   
		                                 <div id="compareDiv" hidden="hidden" style="height:33px;line-height:22px;margin-left:24px;margin-top:10px">
			                                  <div class="formTit">日期：
			                                    <input class="_search-value" name="start" id="thestart" value="" onclick="change_picktime()"/>
			                                  </div>
		                                      <div class="formTit"> 到
			                                    <input class="_search-value" name="end" id="theend" value=""  onclick="change_picktime()"/> 
			                                  </div>		                                                                                     	
	                                      </div>                                                   	
	                                 </div>
	                                  
	                                
                                     <div style="height:62px;line-height:25px;margin-left:80px;margin-top:23px">
	                                    <form id="myform" >
	                                       <input   type="checkbox" value="2" />激活数                             		                                  		
	                                   		<input type="checkbox" value="3" />注册数
	                                   		<input type="checkbox" value="4"/>注册率
	                                   		<input type="checkbox" value="5"/>实名数
	                                   		<input type="checkbox" value="6"/>认证率
	                                   		<input type="checkbox" value="7"/>投资人数
	                                   		<input type="checkbox" value="8"/>首投人数
	                                   		<input type="checkbox" value="9"/>首投占比
	                                   		<input type="checkbox" value="10"/>首投金额
	                                   		<input type="checkbox" value="11"/>投资总额
	                                   		<input type="checkbox" value="12"/>回款额
	                                   		<input type="checkbox" value="13"/>新增待收
	                                   		<input type="checkbox" value="14"/>人均投资
	                                   		<input type="checkbox" value="15"/>平均期限                                  		
	                                   		<input type="checkbox" value="16"/>年化投资额 
	                                   		<!-- <input type="button" value="确定" onclick="test()" /> -->
	                                   	</form>                                                         	
                                    </div>
                                    <div style="height:62px;line-height:22px;margin-left:80px;margin-top:-16px">
                                       <input type="button" value="确定"  class="input-button" onclick="timeSearch();">
                                    </div>
	                            <!--图形插件  -->
	                            <div id="container" style="width: 1600px; height: 500px; margin: 0 auto"></div>
	                            <!--图形插件-->
                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="toolbor-module export">
										&nbsp;&nbsp;&nbsp;站岗资金：${currentTimeBalance}元<br/>
                                </div>
                                <div class="toolbor-module export" >
								                   投资总额：${investmentAll}元<br/>
                                </div>
                                <div class="toolbor-module export">
										新增待收总额：${collectionAll}元<br/>
                                </div>
                                <div class="toolbor-module export">
										年化总额：${yearAccountAll}元<br/>
                                </div>
                                <div class="toolbor-module export">
										实时待收额：${currentTimeCollection}元<br/>
                                </div>
                            	
								
								
                				                                                          
                                <div class="toolbor-module search" style="float:left;" >
                                    <div class="formTit">投资时间：</div>
                                    <input class="_search-value" name="startDate" id="startDate" value="" onclick="change_picktime()"/>
                                    <div class="formTit"> 到 </div>
                                    <input class="_search-value" name="endDate" id="endDate" value=""  onclick="change_picktime()"/>
                                    
                                </div>
                                <div class="toolbor-module search"  >
                    				<input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                				</div>
                                 
                               
                            </div>
                            <!--工具栏--}-->
<style type="text/css">
th.sorted.ascending:after{content:"  \2191"}
th.sorted.descending:after{content:" \2193"}
.data-list .header th{ height:40px; background:url("${request.getContextPath()}/themes/admin/images/table_head_bg.png") repeat-x; border-right:1px solid #ccc; border-bottom:1px solid #ccc; line-height:40px; font-size:12px; font-weight:bold; color:#424242; }
.data-list th{ height:32px; line-height:32px; border-bottom:1px solid #E8E8E8; text-align:center; vertical-align:middle;}
.data-list .color th{ background:#fbfbfb; }
</style>

                            <div id="main" class="clearfix">
                                    <table class="data-list">
                                        <tr class="header">
                                            <th>日期</th>
                                       		<th class="number">激活数</th>
                                            <th class="number">注册数</th>
                                            <th class="number">注册率</th> 
                                            <th class="number">实名认证</th> 
                                            <th class="number">认证率</th>
                                            <th class="number">投资人数</th>
                                            <th class="number">首投人数</th>
                                            <th class="number">首投占比</th> 
                                            <th class="number">首投金额</th>
                                            <th class="number">投资总额</th>
                                            <th class="number">回款额</th>
                                            <th class="number">新增待收</th>
                                            <th class="number">人均投资</th>
                                            <th class="number">平均期限</th>
                                            <th class="number">年化投资额</th>                                                                       
                                        </tr>
                                        <#if list?? && (list?size) gt 0 >
                                        	<#list list as item>
                                        	<#assign a=(item.registerNum/item.activeNum*100)?string('0.00')/><!-- 注册率 -->
                                        	<#assign b=(item.realNameNum/item.registerNum)*100/><!-- 实名认证率 -->
                                        	<#assign c=item.newInvestmentAccount/item.investmentTotal*100/><!--首投率  -->
                                        	<#assign d=item.investmentTotal-item.paymentAccount/><!-- 新增待收 -->
                                        	<#assign e=item.investmentTotal/item.investmentNum/><!-- 人均投资-->
                                        	<#assign f=(item.avgLimit/30)/><!-- 平均投资期限-->
                                        	
                                            <tr class="s">
                                                <td>${item.selectTime}</td>
                                                <td>${(item.activeNum?c)!0}</td>
                                                <td>${item.registerNum?c}</td>
                                                <td>${a}%</td>
                                                <td>${item.realNameNum}</td>
                                                <td>${b?string('0.00')}%</td>
                                                <td>${item.investmentNum}</td>
                                                <td>${item.newInvestmentNum}</td>
                                                <td>${c?string('0.00')}%</td>
                                                <td>${item.newInvestmentAccount?c}</td>
                                                <td>${item.investmentTotal?c}</td>
                                                <td>${item.paymentAccount?c}</td>
                                                <td>${d?c}</td>
                                                <td>${e?string('0.00')}</td>
                                                <td>${f?string('0.00')}月</td> 
                                                <td>${item.yearInvestment?c}</td>   
                                            </tr>
                                        	</#list>
                                         </#if>
                                    </table>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                    <!-- <div style="height:33px;line-height:22px;margin-left:254px;margin-top:34px">
                                      <form id="dateform" >
                                                                                                                            月 <input type="checkbox" value="month" /> 
                                                                                                                             周 <input type="checkbox" value="week" /> 
                                      </form>
                                    </div> -->
	                                
                                    
                                </div>
                                <!--底部工具栏--}-->
								<script src="${request.getContextPath()}/themes/sortjs/jquery-latest.min.js"></script> 
								<script src="${request.getContextPath()}/themes/sortjs/jquery.tablesort.min.js"></script> 
								<script type="text/javascript">
										$(function(){
											$('table.data-list').tablesort().data('tablesort');
											$('.number').data('sortBy', function(th, td, sorter) {
												/* return parseInt(td.text(), 10); */
												return parseFloat(td.text());
											}); 
										});
										
										/* $('#number1').data('sortBy', function(th, td, sorter) {
											return parseInt(td.text(), 10);
										}); */
										</script>
                                <script>
                                    var url = 'queryInvestmentStatitics.html?search=true';

                                    function sousuo(){
                                        var sou = "";
                                       
                                    	
                   					  	var startDate = $("#startDate").val();
                                        var endDate = $("#endDate").val();
                                        	
                                        
                                         if (startDate!=null){
                                             sou += "&startTime="+startDate;
                                         }
                                         if (endDate!=null){
                                             sou += "&endTime="+endDate;
                                         }
                                                                                                                                                                                                       
	                                     if (sou!=""){
	                                            location.href=url+sou;
	                                     }
                                    }
                                
                                    function showOrHide(){
                                    	if(flag==0){                                   		
                                    		$("#compareDiv").show();
                                    		flag=1;
                                    	}else if(flag==1){
                                    		$("#compareDiv").hide();
                                    		flag=0;
                                    	}
                                    	
                                    }
                                    
                                    function timeSearch(){
                                    	/* //获取勾中的年或周
                                        var $chechk = $("#dateform :checkbox:checked");
                                        var dateArr = [];
                                        $chechk.each(function () {
                                            if ($.inArray($(this).attr("value"), dateArr) == -1) {  
                                            	dateArr.push($(this).attr("value"));                 
                                            }
                                        }); */
                                    	
                                    	if(flag==1){//勾中了"和其他时间段对比的复选框"                                   		
                                    		if($('#thestart').val()==""||$('#theend').val()==""){
                                    			alert("请选择对比时间");
                                    			return null;
                                    		}                                   		
                                    		 $.ajax({
                                       		  url: '/admin/statistics/queryInvestmentStatiticsByTime.html',
                                                 type: 'post',
                                                 data:{
                                                	 "type":"compare",                                               
                                                     "start":$('#start').val(),
                                                     "end":$('#end').val(),
                                                     "thestart":$('#thestart').val(),
                                                     "theend":$('#theend').val()
                                                 },
                                                 dataType: 'json',
                                                 success: function (data) {
                                                	 xOneArr.length=0; 
                                                     xTwoArr.length=0; 
                                                	 yOneArr.length=0; 
                                                     yTwoArr.length=0; 
                                                     oneList.length=0;
                                                     twoList.length=0;
                                                	 oneList=data.resultData.resultOne;
                                                	 twoList=data.resultData.resultTwo;
                                                	 for(var i=oneList.length-1;i>=0;i--){
                                                		 xOneArr.push(oneList[i].selectTime);                                    				  
                                        			 } 
                                                	 for(var i=twoList.length-1;i>=0;i--){
                                                		 xTwoArr.push(twoList[i].selectTime);                                    				  
                                        			 } 
                                                	 compare();
                                                 }
                                       	  });  
                                    	}else{
                                    	  $.ajax({
                                    		  url: '/admin/statistics/queryInvestmentStatiticsByTime.html',
                                              type: 'post',
                                              data:{
                                                  "start":$('#start').val(),
                                                  "end":$('#end').val()
                                              },
                                              dataType: 'json',
                                              success: function (data) {  
                                            	  alllist.length=0;
                                            	  xarray.length=0;
                                            	  alllist=data.resultData.result;
                                            	  for(var i=alllist.length-1;i>=0;i--){
                                   				    xarray.push(alllist[i].selectTime);                                    				  
                                   			      } 
                                            	  test();                                           	 
                                              }
                                    	  });  
                                    	}
                                    }
                                </script>
                            </div>

            </td>
        </tr>
        <tr>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </tr>
    </table>

    </body>
</html>
<#include "../jsPage.html">
